<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
      .wrapper {
        width: 500px;
        margin: 0 auto;
        /*居中*/
        border: 1px solid aqua;
        overflow: hidden;
        /*清除浮动*/
      }
      .box1,
      .box2 {
        width: 200px;
        height: 150px;
      }
      .box1 {
        background-color: #ff0000;
        float: left;
      }
      .box2 {
        background-color: green;
        float: right;
      }
    </style>
  </head>
  <body>
    <div class="wrapper">
      <div class="box1">box1</div>
      <!--这里的div属性块级标签，会独占一行-->
      <div class="box2">box2</div>
    </div>
    <p>qwertyyu</p>
  </body>
</html>
